package org.samcolon.eeexplore.hutool;

import cn.hutool.core.lang.Console;
import cn.hutool.core.util.StrUtil;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Description:
 * @author: Sam.zhang
 * @date: 2021/10/25 - 16:51
 */
public class StringUtilTest {
    static String s = "123456789";

    public static void main(String[] args) {
        Console.log(StrUtil.join("-", new Date().getTime(), "aaaa"));
        Console.log(StrUtil.join("-", new Date(), "bbb"));
        Console.log(StrUtil.join("-", LocalDateTime.now(), "ccc"));
        Console.log("subSufByLength 2 {}", StrUtil.subSufByLength(s, 2));
        Console.log("subSuf 3 {}", StrUtil.subSuf(s, 3));
        Console.log("subSufByLength 4 {}", StrUtil.subSufByLength(s, 4));
        Console.log("subPre 1 {}", StrUtil.subPre(s, 1));
        Console.log("subPre 2 {}", StrUtil.subPre(s, 2));
        Console.log("subPre 3 {}", StrUtil.subPre(s, 3));
    }
}
